
#delimit;
global MY_OUT_PATH  "[path where your master data set is stored]"; 
global MY_TEMP_PATH "[path where your temporary files are stored]";
global MY_FIGURE_PATH "[path where your figures and corresponding data sets are stored]";
clear;
clear matrix;
set dp comma, permanently;
set memory 500m; 
set more off;
cap log close;  
use  "${MY_OUT_PATH}HHincomepercentileratios.dta", clear;

**************************************************;
** p90/50;
**************************************************;

#delimit;

label var p9050HHpreincOECD "Bruttohaushaltseinkommen";
label var p9050HHpostincOECD "Nettohaushaltseinkommen";
label var year "Jahr";

drop if year==1983;

graph twoway line p9050HHpreincOECD p9050HHpostincOECD  year ,
xline(1990.5, lcolor(black))
xscale(range(1984 2013))
xlabel(1984(4)2013)
ylabel(1.5(0.5)2.5, format(%4.1f)) 
ytitle("P90/P50-Relation")
lwidth(medthick medthick) lpattern(solid dash ) lcolor(black black)
title("P90/P50 Netto- vs. Bruttoeinkommen");
graph save "${MY_FIGURE_PATH}HHincomep9050", replace;
graph export "${MY_FIGURE_PATH}HHincomep9050.ps", replace;
more;

**************************************************;
** p50/10;
**************************************************;

#delimit;

label var p1050HHpreincOECD "Bruttohaushaltseinkommen";
label var p1050HHpostincOECD "Nettohaushaltseinkommen";


graph twoway line p1050HHpreincOECD p1050HHpostincOECD  year ,
xline(1990.5, lcolor(black))
xscale(range(1984 2013))
xlabel(1984(4)2013)
ytitle("P10/P50-Relation")
ylabel(0.0(0.2)1.0, format(%4.1f)) 
lwidth(medthick medthick ) lpattern(solid dash) lcolor(black black)
title("P10/P50 Netto- vs. Bruttoeinkommen");
graph save "${MY_FIGURE_PATH}HHincomep1050", replace;
graph export "${MY_FIGURE_PATH}HHincomep1050.ps", replace;
more;
